package bairui.international.model.domain.jpa;

/**
 *
 * @see TB_WineBottleNorms 酒瓶规格
 *
 */
public class TestData_TB_WineBottleNorms
{

	private final static org.apache.commons.text.RandomStringGenerator Generator = new org.apache.commons.text.RandomStringGenerator.Builder().withinRange(new char[][]{{'a','z'}, {'A','Z'}, {'0','9'}}).build();

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@org.springframework.transaction.annotation.Transactional(rollbackFor=java.lang.Throwable.class)
	public static TB_WineBottleNorms saveMust(
		org.springframework.context.ApplicationContext context
		
	){
		org.springframework.data.jpa.repository.JpaRepository repository = (org.springframework.data.jpa.repository.JpaRepository)context.getBean("repository_WineBottleNorms");
		return (TB_WineBottleNorms)repository.save(newMust(
				
			));
	}
	
	public static TB_WineBottleNorms newMust(
		
	){
		return new TB_WineBottleNorms(new TB_WineBottleNorms.MustProperties() {
			/** 名称 */
			@Override public String getName(){
				return Generator.generate(0, 255);
			}
			/** 状态 */
			@Override public com.sh_lianjing.model.status.State_UpDown getState(){
				return com.sh_lianjing.model.status.State_UpDown.Downed;
			}
		});
	}
	

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@org.springframework.transaction.annotation.Transactional(rollbackFor=java.lang.Throwable.class)
	public static TB_WineBottleNorms saveAll(
		org.springframework.context.ApplicationContext context
		
	){
		org.springframework.data.jpa.repository.JpaRepository repository = (org.springframework.data.jpa.repository.JpaRepository)context.getBean("repository_WineBottleNorms");
		return (TB_WineBottleNorms)repository.save(newAll(
				
			));
	}
	
	public static TB_WineBottleNorms newAll(
		
	){
		return new TB_WineBottleNorms(
			new TB_WineBottleNorms.MustProperties() {
				/** 名称 */
				@Override public String getName(){
					return Generator.generate(0, 255);
				}
				/** 状态 */
				@Override public com.sh_lianjing.model.status.State_UpDown getState(){
					return com.sh_lianjing.model.status.State_UpDown.Downed;
				}
			},
			new TB_WineBottleNorms.OptionalSingleProperties() {
				/** 备注 */
				@Override public String getComment(){
					return Generator.generate(0, 500);
				}
			}
		);
	}
	

}
